import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '资产编码',
    dataIndex: 'assetCoding'
   },
   {
    title: '资产名称',
    dataIndex: 'assetName'
   },
   {
    title: '规格型号',
    dataIndex: 'spec'
   },
   {
    title: '类别',
    dataIndex: 'category'
   },
   {
    title: '所属公司',
    dataIndex: 'company'
   },
   {
    title: '所属部门',
    dataIndex: 'dept'
   },
   {
    title: '所属人',
    dataIndex: 'owner'
   },
   {
    title: '使用人',
    dataIndex: 'userer'
   },
   {
    title: '使用年限',
    dataIndex: 'useTime'
   },
   {
    title: '原值',
    dataIndex: 'original'
   },
   {
    title: '净值',
    dataIndex: 'netWorth'
   },
   {
    title: 'status',
    dataIndex: 'status'
   },
   {
    title: 'url',
    dataIndex: 'url'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '资产编码',
    field: 'assetCoding',
    component: 'Input'
  },
 {
    label: '资产名称',
    field: 'assetName',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '资产编码',
    field: 'assetCoding',
    component: 'Input',
  },
  {
    label: '资产名称',
    field: 'assetName',
    component: 'Input',
  },
  {
    label: '规格型号',
    field: 'spec',
    component: 'Input',
  },
  {
    label: '类别',
    field: 'category',
    component: 'Input',
  },
  {
    label: '所属公司',
    field: 'company',
    component: 'Input',
  },
  {
    label: '所属部门',
    field: 'dept',
    component: 'Input',
  },
  {
    label: '所属人',
    field: 'owner',
    component: 'Input',
  },
  {
    label: '使用人',
    field: 'userer',
    component: 'Input',
  },
  {
    label: '使用年限',
    field: 'useTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD hh:mm:ss',
    },
  },
  {
    label: '原值',
    field: 'original',
    component: 'Input',
  },
  {
    label: '净值',
    field: 'netWorth',
    component: 'Input',
  },
  {
    label: 'status',
    field: 'status',
    component: 'Input',
  },
  {
    label: 'url',
    field: 'url',
    component: 'Input',
  },
];
